<template>
  <div>
    <el-descriptions title="医嘱信息" :labelStyle="{ width: '140px' }" border>
      <el-descriptions-item label="开单医生工号">{{
        info.presDoctorCode
      }}</el-descriptions-item>
      <el-descriptions-item label="开单医生姓名">{{
        info.presDoctorName
      }}</el-descriptions-item>
      <el-descriptions-item label="开单医生手机号码">{{
        info.presDoctorPhone
      }}</el-descriptions-item>
      <el-descriptions-item label="开单科室名称">{{
        info.presDeptName
      }}</el-descriptions-item>
      <el-descriptions-item label="就诊记录ID">{{
        info.admId
      }}</el-descriptions-item>
      <el-descriptions-item label="患者姓名">{{
        info.patientName
      }}</el-descriptions-item>
      <el-descriptions-item label="患者电话">{{
        info.patientPhone
      }}</el-descriptions-item>
      <el-descriptions-item label="患者门诊号">{{
        info.patientNo
      }}</el-descriptions-item>
      <el-descriptions-item label="患者就诊卡类型"
        ><dict-tag
          :options="dict.type.yy_card_type"
          :value="info.patientNoType"
      /></el-descriptions-item>
      <el-descriptions-item label="患者身份证号">{{
        info.patientCredNo
      }}</el-descriptions-item>
      <el-descriptions-item label="患者性别">{{
        info.patientGender
      }}</el-descriptions-item>
      <el-descriptions-item label="患者年龄">{{
        info.patientAge
      }}</el-descriptions-item>
      <el-descriptions-item label="医嘱接收科室名称">{{
        info.recDeptName
      }}</el-descriptions-item>
      <el-descriptions-item label="医嘱状态">{{
        info.itemStatus
      }}</el-descriptions-item>
      <el-descriptions-item label="医嘱备注">{{
        info.remark
      }}</el-descriptions-item>
      <el-descriptions-item label="HIS交易号">{{
        info.transactionId
      }}</el-descriptions-item>
      <el-descriptions-item label="医生CA签名"
        ><image-preview
          :src="info.doctorSign"
          :width="50"
          :height="50"
          v-if="info.doctorSign"
      /></el-descriptions-item>
      <el-descriptions-item label="处方类型"
        ><dict-tag :options="dict.type.yy_recipe_types" :value="info.presType"
      /></el-descriptions-item>
      <!-- 中药 -->
      <template v-if="info.presType == 3">
        <el-descriptions-item label="饮片剂量">{{
          info.drugAmount
        }}</el-descriptions-item>
        <el-descriptions-item label="用药方法">{{
          info.useMethod
        }}</el-descriptions-item>
        <el-descriptions-item label="煎煮法">{{
          info.decoction
        }}</el-descriptions-item>
      </template>
      <!-- 中药结束 -->
      <el-descriptions-item label="药品种类数量">{{
        info.drugSpeciesNum
      }}</el-descriptions-item>
      <el-descriptions-item label="订单类型"
        ><dict-tag :options="dict.type.yy_order_types" :value="info.orderType"
      /></el-descriptions-item>
      <el-descriptions-item label="处方来源"
        ><dict-tag
          :options="dict.type.yy_source_type"
          :value="info.prescriptionSource"
      /></el-descriptions-item>
      <el-descriptions-item label="门诊号(病历号)">{{
        info.medicalRecordNo
      }}</el-descriptions-item>
      <el-descriptions-item label="诊断">{{
        info.diagnostic
      }}</el-descriptions-item>
      <el-descriptions-item label="开药时间">{{
        info.obtainTime
      }}</el-descriptions-item>
      <el-descriptions-item label="处方笺"
        ><image-preview
          :src="info.ossUrl"
          :width="50"
          :height="50"
          v-if="info.ossUrl"
      /></el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
import { getMedicalAdvice } from "@/api/pr/basics";

export default {
  name: "Basics",
  dicts: [
    "yy_recipe_types",
    "yy_source_type",
    "yy_order_types",
    "yy_card_type",
  ],
  data() {
    return {
      info: {},
    };
  },
  created() {},
  methods: {
    getdDetail(id) {
      getMedicalAdvice({
        basiceId: id,
      }).then((response) => {
        this.info = response.data;
      });
    },
  },
};
</script>
